home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_10_07
/
1007030a
< prev
next >
Wrap
Text File
|
1992-05-07
|
675b
|
30 lines
// Main is called by Liana to start the application
main
{
// Create and show a window.
(w = new window).show;
}
// Paint is called by Liana to update window.
// Note that it queries the current window
// size to calculate the graphic coordinates.
paint
{
// Some text.
w << "Hello World";
// Diagonal line from upper left to lower right.
w.line (0, 0, w.width, w.height);
// Circle in middle of screen.
int x = w.width / 2;
int y = w.height / 2;
int r = min (w.width, w.height) / 4;
w.circle (x, y, r);
// Rectangle around the circle.
w.rectangle (x - r - 30, y - r - 10,
x + r + 30, y + r + 10);
}